package com.xiaohudie.Ioliu;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Author xiao hu die
 * @Date 2022/3/14 15:27
 * @Version 1.0
 */
public class TestProperties {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        /**默认就是读取resources下面的文件*/
        InputStream resourceAsStream = TestProperties.class.getResourceAsStream("/dp.properties");
        properties.load(resourceAsStream);
        String property = properties.getProperty("cheng");
        System.out.println(property);
    }
}
